package com.rich.im.service.impl;

import com.rich.common.entity.Message;
import com.rich.im.mapper.MessageMapper;
import com.rich.im.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author HanSama
 * @date 2021年08月19日 14:32
 */
@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;

    /**
     * 获取与某人的聊天记录
     * @author HanSama
     * @date 2021/8/19 14:38
     * @param fromId
     * @param toId
     * @return java.util.List<com.rich.common.entity.Message>
     */
    @Override
    public List<Message> findListByFromAndTo(Long fromId, Long toId) {

        return messageMapper.findListByFromAndTo(fromId,toId);
    }



}
